package com.lzk.策略模式.使用策略模式改进代码;

import com.lzk.策略模式.使用策略模式改进代码.flyBehaviorImpl.NoFlyBehavior;

/**
 * @author: zhongkui 1365693530@qq.com
 * @Date: 2024/7/15
 */
public class ToyDuck extends Duck {

    public ToyDuck() {
        flyBehavior = new NoFlyBehavior();
    }

    @Override
    public void display() {
        System.out.println("我是玩具鸭");
    }

    @Override
    public void fly() {
        System.out.println("玩具鸭不会飞~~~~~~");
    }

    @Override
    public void swim() {
        System.out.println("玩具鸭不会游泳");
    }

    @Override
    public void quack() {
        System.out.println("玩具鸭不会叫");
    }
}
